﻿using FlowCanvas.Nodes;
using OWL.Rendering.HRP;

namespace Yoozoo.Gameplay.Liberty.Nodes
{
    /// <summary>
    /// 开启或者关闭渲染场景
    /// </summary>
    public class SetRenderScene : CallableActionNode<bool, string>
    {
        /// <param name="enable">开启还是关闭</param>
        /// <param name="renderSceneName">HRenderSceneCache的字段名</param>
        public override void Invoke(bool enable, string renderSceneName)
        {
            if(enable)
                HRenderSceneManager.Inst.EnableBaseScene(renderSceneName);
            else
                HRenderSceneManager.Inst.DisableBaseScene(renderSceneName);
        }
    }
}
